package com.youi.entity;

import java.util.Date;

import com.youi.common.DelStatus;

import java.sql.*;


import java.io.Serializable;


/**
 * 实体类
 * @author XJY
 */
public class Purchasehistory implements Serializable {

	private Long id;							//ID
	private Date gmtCreated;					//创建时间
	private Integer delStatus;					//删除状态（0否 1是）
	private Date gmtModify;					    //最后修改时间
	private Long userId;					    //用户id
	private Long goodsId;					    //商品id
	private Date gmtBuy;					    //购买时间
	private Integer count;					    //数量

	private String userImg;						//用户头像
	private String nickName;					//用户昵称
	
	
    public Purchasehistory(){

    }

    public Purchasehistory(Long id,Date gmtCreated,Integer delStatus,Date gmtModify) {
       this.id=id;
       this.gmtCreated=gmtCreated;
       this.delStatus=delStatus;
       this.gmtModify=gmtModify;
    }


    public Purchasehistory(Long userId,Long goodsId,Integer count) {
       this.gmtCreated=new Date();
       this.delStatus=DelStatus.NODEL;
       this.gmtModify=gmtCreated;
       this.userId=userId;
       this.goodsId=goodsId;
       this.gmtBuy=gmtCreated;
       this.count=count;
    }


	public void setId(Long id){
		this.id=id;
	}

	public Long getId(){
		return id;
	}

	public void setGmtCreated(Date gmtCreated){
		this.gmtCreated=gmtCreated;
	}

	public Date getGmtCreated(){
		return gmtCreated;
	}

	public void setDelStatus(Integer delStatus){
		this.delStatus=delStatus;
	}

	public Integer getDelStatus(){
		return delStatus;
	}

	public void setGmtModify(Date gmtModify){
		this.gmtModify=gmtModify;
	}

	public Date getGmtModify(){
		return gmtModify;
	}

	public void setUserId(Long userId){
		this.userId=userId;
	}

	public Long getUserId(){
		return userId;
	}

	public void setGoodsId(Long goodsId){
		this.goodsId=goodsId;
	}

	public Long getGoodsId(){
		return goodsId;
	}

	public void setGmtBuy(Date gmtBuy){
		this.gmtBuy=gmtBuy;
	}

	public Date getGmtBuy(){
		return gmtBuy;
	}

	public void setCount(Integer count){
		this.count=count;
	}

	public Integer getCount(){
		return count;
	}

	public String getUserImg() {
		return userImg;
	}

	public void setUserImg(String userImg) {
		this.userImg = userImg;
	}

	public String getNickName() {
		return nickName;
	}

	public void setNickName(String nickName) {
		this.nickName = nickName;
	}

}
